<template>
  <div>
    <div class="nav"><bread-crumb></bread-crumb></div>
    <h1>入学所有成绩查询</h1>
    <div class="btn">
      <el-button @click="search">查询</el-button>
    </div>
    <div class="table_wrap" v-if="show">
      <el-table :data="result" style="width: 100%">
        <el-table-column prop="stu_id" label="学号" width="100">
        </el-table-column>
        <el-table-column prop="stu_name" label="姓名" width="100">
        </el-table-column>
        <el-table-column prop="chinese" label="语文" width="100">
        </el-table-column>
        <el-table-column prop="math" label="数学" width="100">
        </el-table-column>
        <el-table-column prop="english" label="英语" width="100">
        </el-table-column>
        <el-table-column prop="lizong" label="理综" width="100">
        </el-table-column>
        <el-table-column prop="wenzong" label="文宗" width="100">
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import { req_qizhong_all_chaxun } from "../../../api/chengjixx";
export default {
  data() {
    return {
      stu_id: "",
      stu_name: "",
      chinese: "",
      math: "",
      english: "",
      lizong: "",
      wenzong: "",
      show: false,
      result: [],
    };
  },
  methods: {
    async search() {
      console.log(this.stu_id);
      let result = await req_qizhong_all_chaxun(this.stu_id);
      console.log(result);
      this.result = result.data;
      this.show = true;
      console.log(this.result);
    },
  },
};
</script>

<style lang="scss" scoped>
h1 {
  text-align: center;
  padding: 20px;
}
.btn{
  padding: 40px;
  text-align: center;
}
</style>